package com.symria.server.http.bean;

import com.symria.server.http.json.JSONException;
import com.symria.server.http.json.JSONObject;

/**
 * @author admin
 * 广告请求封装类.
 */
public class AdRequest implements java.io.Serializable {
	
	public  String pid;//应用id
	public  String key;//验证码
	public  String imei;//imei
	public  String imsi;//IMSI
	public  String sim;//sim串号
	public  String rom;//机型
	public  String ver;//系统版本
	public  String net;//网络类型
	public  String oper;//运营商
	public  String packname;//包名
	public  String sdk_ver="1.0";//请求版本

	
	
	public String getPackname() {
		return packname;
	}
	public void setPackname(String packname) {
		this.packname = packname;
	}
	public String getSdk_ver() {
		return sdk_ver;
	}
	public void setSdk_ver(String sdkVer) {
		sdk_ver = sdkVer;
	}
	public String getPid() {
		return pid;
	}
	public void setPid(String pid) {
		this.pid = pid;
	}
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getImei() {
		return imei;
	}
	public void setImei(String imei) {
		this.imei = imei;
	}
	public String getImsi() {
		return imsi;
	}
	public void setImsi(String imsi) {
		this.imsi = imsi;
	}
	public String getSim() {
		return sim;
	}
	public void setSim(String sim) {
		this.sim = sim;
	}
	public String getRom() {
		return rom;
	}
	public void setRom(String rom) {
		this.rom = rom;
	}
	public String getVer() {
		return ver;
	}
	public void setVer(String ver) {
		this.ver = ver;
	}
	public String getNet() {
		return net;
	}
	public void setNet(String net) {
		this.net = net;
	}
	public String getOper() {
		return oper;
	}
	public void setOper(String oper) {
		this.oper = oper;
	}
	public JSONObject toJsonObject(){
		JSONObject o = new JSONObject();
		try {
			o.accumulate("imei", this.getImei());
			o.accumulate("imsi", this.imsi);
			o.accumulate("key", this.key);
			o.accumulate("net", this.net);
			o.accumulate("oper", this.oper);
			o.accumulate("packname", this.packname);
			o.accumulate("pid", this.pid);
			o.accumulate("rom", this.rom);
			o.accumulate("sdk_ver", this.sdk_ver);
			o.accumulate("sim", this.sim);
			o.accumulate("ver", this.ver);
		} catch (JSONException e) {
			return o;
		}
		return o;
	}
	
	
	
}
